package vip.sweet.biz.modular.comment.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.sweet.biz.modular.comment.params.BizCommentImagesAddParams;
import vip.sweet.biz.modular.comment.service.BizCommentImagesService;
import vip.sweet.common.enums.ResponseEnum;
import vip.sweet.common.response.CommonResponse;

/**
 * @author ASUS
 * @Date 2025/10/4 23:49
 * @Descripition
 */
@RestController
@RequestMapping("/biz/comment/images")
@Tag(name = "评论图片管理控制器")
@Slf4j
public class BizCommentImagesController {
    @Resource
    private BizCommentImagesService bizCommentImagesService;
    @PostMapping("/add")
    @Operation(summary = "添加评论图片接口")
    public CommonResponse add(@RequestBody @Validated BizCommentImagesAddParams addCommentsParams) {
        return bizCommentImagesService.add(addCommentsParams)? CommonResponse.success("添加成功") : CommonResponse.error(ResponseEnum.ERROR,"添加失败");
    }
}
